import request from '@/util/ssoRequest';
import commonUtil from "@/util/commonUtil";

export default {
  login(data){
    return request({
      url: `/fullsemi/auth/login`,
      method: 'post',
      params:{
        userName: commonUtil.encodeRSA(data.username), //用户名
        password: commonUtil.encodeRSA(data.password) //密码
      }
    })
  },
  logout(data) {
    return request({
      url: '/fullsemi/auth/logout',
      method: 'post',
      headers:{
        token:window.localStorage.getItem('access_token')
      }
    });
  }
};
